package cn.edu.ctbu.scoremg.interceptor;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterCeptor())
                .addPathPatterns("/**") //拦截所有请求
                .excludePathPatterns("/login","api/student/validateUser",
                        "/css/**","/admin/**","component/**","pagejs/**","config/**","views/**");

    }


}
